package cn.shop.admin.service.impl;

import cn.shop.admin.service.BackSettingService;
import cn.shop.base.MyServiceImpl;
import cn.shop.transcation.backSetting.entity.BackSetting;
import cn.shop.transcation.backSetting.mapper.BackSettingMapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import org.springframework.stereotype.Service;

/**
 * 总后台设置表 (BackSetting)表服务实现类
 *
 * @author jzw
 * @since 2022-01-10 17:09:50
 */
@Service("backSettingService")
public class BackSettingServiceImpl extends MyServiceImpl<BackSettingMapper, BackSetting> implements BackSettingService {

	@Override
	public BackSetting getOneByKey(String key) {
		LambdaQueryWrapper<BackSetting> query = Wrappers.lambdaQuery();
		query.eq(BackSetting::getKey, key);
		return baseMapper.selectOne(query);
	}

}

